<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    img {
        width: 640px;
        height: 320px;
    }
    
    .active {
        background-color: red;
    }
    
    .btn-list {
        position: absolute;
        left: 300px;
        top: 300px;
    }
</style>

<body>
    <img src="images/1.png" alt="">
    <div class="btn-list">
        <button class="active">1</button>
        <button>2</button>
        <button>3</button>
    </div>
    <script src="JavaScript/jquery.min.js"></script>
    <script>
        $("button").click(function() {
            let imgSrc = [
                    "images/1.png",
                    "images/2.png",
                    "images/3.png"
                ]
                // 获取索引
            let index = $(this).index();
            // 设置属性
            $("img").attr("src", imgSrc[index]);
            $(this).addClass("active");
            $(this).siblings().removeClass("active");
        })
    </script>
</body>

</html>